﻿@model TypeWrite.MVC4.Areas.Setup.Models.DataSource

@{
    ViewBag.Title = "Configure Data Source";
}

<h2>Database Configuration</h2>

@using (Html.BeginForm())
{

    <fieldset>
        <legend>Server</legend>

        <p>Specify the SQL server (host\instance)</p>

        @Html.LabelFor(model => model.Server)
        @Html.TextBoxFor(model => model.Server)

    </fieldset>
    
    <fieldset>
        <legend>Credentials</legend>

        <p>The credentials provided must have <i><b>dbcreator</b></i> permissions on the SQL instance specified above</p>

        <div>
            @Html.LabelFor(model => model.UserID)
            @Html.TextBoxFor(model => model.UserID)
        </div>

        <div>
            @Html.LabelFor(model => model.Password)
            @Html.PasswordFor(model => model.Password)
        </div>

    </fieldset>
    
    <fieldset>
        <legend>Database</legend>

        <p>Specify the name of the database to be used on the SQL instance specified above. NOTE: If the database exists already, it will be used. If it does not, it will be created in the next step.</p>

        <div>
            @Html.LabelFor(model => model.Database)
            @Html.TextBoxFor(model => model.Database)
        </div>

    </fieldset>
    
    <input type="submit" value="Next" />
    
}